﻿<cfsilent>
	<cfscript>
		
		datetimeAdvice = getProperty("serviceFactory").getBean("datetimeAdvice");
		
		event.setArg("pageTitle", "教学运行管理 - 教学任务安排 - 任务安排相关设置");
		
		/* 考试相关设置 */
		dateStart = event.getArg("TASK.DateStart");
		dateEnd = event.getArg("TASK.DateEnd");
		
		limiteB2 = event.getArg("TASK.LIMITE.B2");
		limiteS2 = event.getArg("TASK.LIMITE.S2");
		limiteS3 = event.getArg("TASK.LIMITE.S3");
		
		if ( dateStart eq "" ) {
			dateStart = dateFormat( now(), "YYYYMMDD" );
		}
		if ( dateEnd eq "" ) {
			dateEnd = dateFormat( dateAdd( "D", 14, now() ), "YYYYMMDD" );
		}
		
		if ( limiteB2 eq "" ) {
			limiteB2 = "3";
		}
		if ( limiteS2 eq "" ) {
			limiteS2 = "99";
		}
		if ( limiteS3 eq "" ) {
			limiteS3 = "1";
		}

		currentTab = event.getArg("TabID", "labFinal");
		
	</cfscript>
</cfsilent>

<div id="headArea">
	<div class="uiHeader uiHeaderWithImage ptm">
		<div class="clearfix uiHeaderTop">
			<div class="uiHeaderActions rfloat">
				<a class="uiButton" href="<cfoutput>#buildURL('DEFAULT_EVENT')#</cfoutput>"><i class="mrs img btnList"></i><span class="uiButtonText">教学任务安排</span></a>
			</div>
			<div>
				<h2 class="uiHeaderTitle">
					<i class="uiHeaderImage img icon16x16 setting"></i>教学任务安排相关设置
				</h2>
			</div>
		</div>
	</div>
</div>

<div class="UIElement">
	<ul class="senateFirstPage">
		<li>
			<div class="clearfix" id="summary">
				<div class="UItab">
					<div class="tabLables">
						<span <cfif currentTab eq "labFinal">class="active"</cfif> id="labFinal" tabTarget="Final">教学任务安排</span>
					</div>
				</div>
				<script language="javascript" type="text/javascript">
					//<![CDATA[
					<!--
					$(document).ready(function() {
						
						/* init Tab */
						$("div.tabContent").hide();
						$("div#" + $("div.tabLables span.active").attr("tabTarget")).show();
						
						$("div.tabLables > span").click(function(){
							var $targetID = $(this).attr("tabTarget");
							
							$("div.tabLables span").removeClass("active");
							$(this).addClass("active");
							
							$("div.tabContent").not('[id="' + $targetID + '"]').hide();
							$("div.tabContent#" + $targetID).show();
						});
						
					});
					// -->
					//]]>
				</script>

				<div id="Final" class="tabContent">
					
					<div class="noticeBlock">
						<h3>考试设置</h3>
						<hr/>
					</div>
					
					<form id="formEdit" onSubmit="javascript:return processVerfiyForm('formEdit');" class="formWrapper" method="post" action="<cfoutput>#buildURL('taskSettingSaveDo')#</cfoutput>">
						
						<input name="TabID" type="hidden" value="labFinal" />
						
						<div class="label">
							<span class="req">*</span><b>起止时间段</b>
							
							<input name="DateStart" id="DateStart" type="text" class="typeDate" verification="date" maxlength="10" value="<cfoutput>#datetimeAdvice.formatDateString( dateStart )#</cfoutput>" /><span id="startTrigger" class="btnCalendar"></span>
							&nbsp;&nbsp;
							至
							&nbsp;&nbsp;
							<input name="DateEnd" id="DateEnd" type="text" class="typeDate" verification="date" maxlength="10" value="<cfoutput>#datetimeAdvice.formatDateString( dateEnd )#</cfoutput>" /><span id="endTrigger" class="btnCalendar"></span>
							
							<p class="notice">
								允许学院网上进行教学任务安排的时间段.
							</p>
							
						</div>
						
						<div class="label">
							<span class="req">*</span><b>课程最大重复任务数</b>
							<div class="secondRow">
								素质选修课 
								<input name="LimiteB2" id="LimiteB2" type="text" class="typeTinyInt" verification="integer" maxlength="2" value="<cfoutput>#limiteB2#</cfoutput>" />
								尔雅网络通识课 
								<input name="LimiteS3" id="LimiteS3" type="text" class="typeTinyInt" verification="integer" maxlength="2" value="<cfoutput>#limiteS3#</cfoutput>" />
							</div>
							<div class="secondRow">
								体育项目 
								<input name="LimiteS2" id="LimiteS2" type="text" class="typeTinyInt" verification="integer" maxlength="2" value="<cfoutput>#limiteS2#</cfoutput>" />
							</div>
						</div>

						<div class="lable">
							<input class="button" type="submit" value="保存" />
							<input id="formReset" class="button1" type="reset" value="重设表格" />
						</div>
						
					</form>
					<script language="javascript" type="text/javascript">
						//<![CDATA[
						<!--
						$(document).ready(function() {
							
							$("#FinalDateStart").mask("9999-99-99");
							$("#FinalDateEnd").mask("9999-99-99");
							
							Calendar.setup({
									trigger    : "startTrigger",
									inputField : "DateStart",
									animation  : false
									});
								
							Calendar.setup({
									trigger    : "endTrigger",
									inputField : "DateEnd",
									animation  : false
									});

						});
						// -->
						//]]>
					</script>

				</div>
				
			</div>
		</li>
	</ul>
</div>